Request For Payment Outbound
The RequestForPayment API enables to request for a payment from the sender.
Method: POST
{{URL}}/rtp/rpc/TransactionService/RequestForPayment
Headers
Name | Value |
---|---|
Content-Type | application/json |
Credential | "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmN5NWQxY2RlNDE5" |
Signature | "{{signature}}" |
Example
Payload Parameters
- cURL
- C#
- Go
- NodeJs
curl --location '{{URL}}/rtp/rpc/TransactionService/RequestForPayment' \
--header 'Content-Type: application/json' \
--data '{"referenceNumber":"M20231109918765022223","processor":"TCH","senderType":"BUSINESS","debtorAccount":{"memberId":"234567891","Name":"hjaa","accountNumber":"1234565678","dateAndPlaceOfBirth":{"birthDate":"1990-01-19","cityOfBirth":"New York","countryOfBirth":"US"},"address":{"streetName":"Facebookstreet","postalCode":"Kotre","townName":"Chicago","countrySubDiv":"LM","country":"US"}},"creditorAccount":{"memberId":"072403473","name":"Seve","accountNumber":"123457890","dateAndPlaceOfBirth":{"birthDate":"1990-01-20","cityOfBirth":"New York","countryOfBirth":"US"},"address":{"streetName":"sdsds","postalCode":"1245","townName":"Chicago","countrySubDiv":"LM","country":"US"}},"paymentInfo":{"expDate":"2024-03-28"},"payCond":{"amtModAllwd":false,"earlyPmtAllwd":true,"grntedPmtReqd":false},"instructedAmount":{"amount":22759,"currency":"USD"}}'
var options = new RestClientOptions("{{URL}}")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/rtp/rpc/TransactionService/RequestForPayment", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""referenceNumber"": ""M20231109918765022223"",
" + "\n" +
@" ""processor"": ""TCH"",
" + "\n" +
@" ""senderType"": ""BUSINESS"",
" + "\n" +
@" ""debtorAccount"": {
" + "\n" +
@" ""memberId"": ""234567891"",
" + "\n" +
@" ""Name"": ""hjaa"",
" + "\n" +
@" ""accountNumber"": ""1234565678"",
" + "\n" +
@" ""dateAndPlaceOfBirth"": {
" + "\n" +
@" ""birthDate"": ""1990-01-19"",
" + "\n" +
@" ""cityOfBirth"": ""New York"",
" + "\n" +
@" ""countryOfBirth"": ""US""
" + "\n" +
@" },
" + "\n" +
@" ""address"": {
" + "\n" +
@" ""streetName"": ""Facebookstreet"",
" + "\n" +
@" ""postalCode"": ""Kotre"",
" + "\n" +
@" ""townName"": ""Chicago"",
" + "\n" +
@" ""countrySubDiv"": ""LM"",
" + "\n" +
@" ""country"": ""US""
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""creditorAccount"": {
" + "\n" +
@" ""memberId"": ""072403473"",
" + "\n" +
@" ""name"": ""Seve"",
" + "\n" +
@" ""accountNumber"": ""123457890"",
" + "\n" +
@" ""dateAndPlaceOfBirth"": {
" + "\n" +
@" ""birthDate"": ""1990-01-20"",
" + "\n" +
@" ""cityOfBirth"": ""New York"",
" + "\n" +
@" ""countryOfBirth"": ""US""
" + "\n" +
@" },
" + "\n" +
@" ""address"": {
" + "\n" +
@" ""streetName"": ""sdsds"",
" + "\n" +
@" ""postalCode"": ""1245"",
" + "\n" +
@" ""townName"": ""Chicago"",
" + "\n" +
@" ""countrySubDiv"": ""LM"",
" + "\n" +
@" ""country"": ""US""
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""paymentInfo"": {
" + "\n" +
@" ""expDate"": ""2024-03-28""
" + "\n" +
@" },
" + "\n" +
@" ""payCond"": {
" + "\n" +
@" ""amtModAllwd"": false,
" + "\n" +
@" ""earlyPmtAllwd"": true,
" + "\n" +
@" ""grntedPmtReqd"": false
" + "\n" +
@" },
" + "\n" +
@" ""instructedAmount"": {
" + "\n" +
@" ""amount"": 22759,
" + "\n" +
@" ""currency"": ""USD""
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{URL}}/rtp/rpc/TransactionService/RequestForPayment"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"referenceNumber": "M20231109918765022223",`+"
"+`
"processor": "TCH",`+"
"+`
"senderType": "BUSINESS",`+"
"+`
"debtorAccount": {`+"
"+`
"memberId": "234567891",`+"
"+`
"Name": "hjaa",`+"
"+`
"accountNumber": "1234565678",`+"
"+`
"dateAndPlaceOfBirth": {`+"
"+`
"birthDate": "1990-01-19",`+"
"+`
"cityOfBirth": "New York",`+"
"+`
"countryOfBirth": "US"`+"
"+`
},`+"
"+`
"address": {`+"
"+`
"streetName": "Facebookstreet",`+"
"+`
"postalCode": "Kotre",`+"
"+`
"townName": "Chicago",`+"
"+`
"countrySubDiv": "LM",`+"
"+`
"country": "US"`+"
"+`
}`+"
"+`
},`+"
"+`
"creditorAccount": {`+"
"+`
"memberId": "072403473",`+"
"+`
"name": "Seve",`+"
"+`
"accountNumber": "123457890",`+"
"+`
"dateAndPlaceOfBirth": {`+"
"+`
"birthDate": "1990-01-20",`+"
"+`
"cityOfBirth": "New York",`+"
"+`
"countryOfBirth": "US"`+"
"+`
},`+"
"+`
"address": {`+"
"+`
"streetName": "sdsds",`+"
"+`
"postalCode": "1245",`+"
"+`
"townName": "Chicago",`+"
"+`
"countrySubDiv": "LM",`+"
"+`
"country": "US"`+"
"+`
}`+"
"+`
},`+"
"+`
"paymentInfo": {`+"
"+`
"expDate": "2024-03-28"`+"
"+`
},`+"
"+`
"payCond": {`+"
"+`
"amtModAllwd": false,`+"
"+`
"earlyPmtAllwd": true,`+"
"+`
"grntedPmtReqd": false`+"
"+`
},`+"
"+`
"instructedAmount": {`+"
"+`
"amount": 22759,`+"
"+`
"currency": "USD"`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': '{{URL}}',
'path': '/rtp/rpc/TransactionService/RequestForPayment',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"referenceNumber": "M20231109918765022223",
"processor": "TCH",
"senderType": "BUSINESS",
"debtorAccount": {
"memberId": "234567891",
"Name": "hjaa",
"accountNumber": "1234565678",
"dateAndPlaceOfBirth": {
"birthDate": "1990-01-19",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": {
"streetName": "Facebookstreet",
"postalCode": "Kotre",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"creditorAccount": {
"memberId": "072403473",
"name": "Seve",
"accountNumber": "123457890",
"dateAndPlaceOfBirth": {
"birthDate": "1990-01-20",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": {
"streetName": "sdsds",
"postalCode": "1245",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"paymentInfo": {
"expDate": "2024-03-28"
},
"payCond": {
"amtModAllwd": false,
"earlyPmtAllwd": true,
"grntedPmtReqd": false
},
"instructedAmount": {
"amount": 22759,
"currency": "USD"
}
});
req.write(postData);
req.end();
Request Body (Applicable for both FedNow and TCH)
{
"referenceNumber": "M20231109918765022223",
"processor": "TCH",
"senderType": "BUSINESS", //applicable only for TCH
"debtorAccount": {
"memberId": "234567891",
"Name": "hjaa",
"accountNumber": "1234565678",
"dateAndPlaceOfBirth": { //applicable only for TCH
"birthDate": "1990-01-19",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": { //applicable only for TCH
"streetName": "Facebookstreet",
"postalCode": "Kotre",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"creditorAccount": {
"memberId": "072403473",
"name": "Seve",
"accountNumber": "123457890",
"dateAndPlaceOfBirth": { //applicable only for TCH
"birthDate": "1990-01-20",
"cityOfBirth": "New York",
"countryOfBirth": "US"
},
"address": { //applicable only for TCH
"streetName": "sdsds",
"postalCode": "1245",
"townName": "Chicago",
"countrySubDiv": "LM",
"country": "US"
}
},
"paymentInfo": {
"expDate": "2024-03-28"
},
"payCond": { //applicable only for TCH
"amtModAllwd": false,
"earlyPmtAllwd": true,
"grntedPmtReqd": false
},
"instructedAmount": {
"amount": 22759,
"currency": "USD"
}
}
Response: 200
Response Parameters
Response Body (Applicable for both FedNow and TCH)
{
"response": "JSON Representation of Received Response",
"message": "success",
"endToEndId": "M20231109918765022223",
"messageId": "M20240328111112222T1BQDO49266572611",
"rawMessage": "Base64 Value of Received Response",
"status": "RCVD",
"paymentId": "20240328111112222T1BPQCW49266572611"
}